package com.cy.common;

import javax.crypto.interfaces.PBEKey;

/**
 * @Author: cy
 * @Date: 2022/01/01/15:52
 * @Description:
 */
public class Constant {

    /**
     * 普通用户
     */
    public static final Integer GENERAL_USER = 0;
    public static final Integer SUPER_USER = 1;     //超级管理员
    public static final Integer MODERATOR = 2;      //版主

    public static final Integer NOT_ACTIVE = 0;     //未激活
    public static final Integer ACTIVE = 1;         //已激活


    /**
     * 激活成功
     */
    public static final Integer ACTIVATION_SUCCESS = 0;

    /**
     * 重复激活
     */
    public static final Integer ACTIVATION_REPEAT = 1;


    /**
     * 激活失败
     */
    public static final Integer ACTIVATION_FAIL = 2;

    /**
     * 登录凭证有效
     */
    public static final Integer LOGIN_TICKET_CAN_USE = 0;

    /**
     * 登录凭证无效
     */
    public static final Integer LOGIN_TICKET_CANNOT_USE = 1;


    /**
     * 默认状态的登录凭证超时时间
     */
    public static final Integer DEFUALT_EXPIRED_SECONDS = 3600*12;  // 半天

    /**
     * 记住状态的登录凭证超时时间
     */
    public static final Integer REMEMBER_EXPIRED_SECONDS = 3600*24*100; // 100天

    /**
     * 评论实体类型：帖子
     */
    public static final Integer ENTITY_TYPE_POST = 1;

    /**
     * 实体类型：评论
     */
    public static final Integer ENTITY_TYPE_COMMENT = 2;

    /**
     * 实体类型：用户
     */
    public static final Integer ENTITY_TYPE_USER = 3;

    /**
     * 消息状态删除
     */
    public static final Integer MESSAGE_STATUS_DELETED = 2;


    /**
     * kafka主题
     * 评论
     */
    public static final String TOPIC_COMMENT = "comment";

    /**
     * 主题  点赞
     */
    public static final String TOPIC_LIKE = "like";

    /**
     * 主题 关注
     */
    public static final String TOPIC_FOLLOW = "follow";

    /**
     * 主题 发帖
     */
    public static final String TOPIC_PUBLIC = "PUBLIC";


    /**
     * 主题  删帖
     */
    public static final String TOPIC_DELETE = "delete";


    /**
     * 系统发送消息的id号
     */
    public static final int SYSTEM_USER_ID = 1;



    /**
     * 权限: 普通用户
     */
    public static final String AUTHORITY_USER = "user";

    /**
     * 权限: 管理员
     */
    public static final String AUTHORITY_ADMIN = "admin";

    /**
     * 权限: 版主
     */
    public static final String AUTHORITY_MODERATOR = "moderator";
}
